﻿<local:DocumentBase x:Class="WPFExcelReport.YGRVKDOC"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    Loaded="Window_Loaded" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    Background="White" 
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:MaskPrice  x:Key="dprice"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:Divideby10000  x:Key="d10000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="trim"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetDetail" />
        <db:SETINTEXDB  x:Key="SetEnv" />
        <db:SETINTEXDB  x:Key="SetVV" />
        <CollectionViewSource   x:Key="vwMaster" Source="{Binding Path=VKPOS,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwEvents" Source="{Binding Path=ICC_WFEVENTS,Source={StaticResource SetDetail}}" />
        <CollectionViewSource   x:Key="vwTXT" Source="{Binding Path=ICC_TXTKON,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwVKKOPF" Source="{Binding Path=VKKOPF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwPVKPOS" Source="{Binding Path=VKPOS,Source={StaticResource SetDetail}}" />
        <CollectionViewSource   x:Key="vwPTXT" Source="{Binding Path=ICC_TXTKON,Source={StaticResource SetDetail}}" />
        <CollectionViewSource   x:Key="vwVVTLIEF" Source="{Binding Path=VVTLIEF,Source={StaticResource SetVV}}" />
        <CollectionViewSource   x:Key="vwVVLIEF" Source="{Binding Path=VVLIEF,Source={StaticResource SetVV}}" />
        <CollectionViewSource   x:Key="vwZUTEI" Source="{Binding Path=ZUTEI,Source={StaticResource SetVV}}" />
        <CollectionViewSource   x:Key="vwGPACK" Source="{Binding Path=GPACK,Source={StaticResource SetVV}}" />
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto" ></RowDefinition>
            <RowDefinition Height="1*" ></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Expander  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
            Name="expLog" ExpandDirection="Down" IsExpanded="True">
            <StackPanel>
                <WrapPanel Name="zoneCommand" Margin="4,0,51,6" Grid.ColumnSpan="3">
                    <Label Content="系统" Width="Auto" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                    <TextBox Name="txtMANDANT" MaxLength="2" Width="40" Margin="10,0,0,0" Text="00" HorizontalAlignment="Left" Background="Pink"  TabIndex="1" />
                    <Label Content="语言" Width="Auto" Margin="0,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                    <TextBox IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1" HorizontalAlignment="Left" Background="Pink" FontSize="18" TabIndex="2" />
                    <Label Content="用户名" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                    <TextBox Name="txtUserID" Width="80" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="False" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0" TabIndex="3" />
                    <Label Content="密码" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left"  VerticalAlignment="Center" />
                    <PasswordBox Name="txtPassword" Width="80" Margin="10,0,0,0" HorizontalAlignment="Left" Background="Yellow"  KeyboardNavigation.TabIndex="1" TabIndex="4" />
                    <Button Height="Auto" Margin="10,0,0,0" Name="btnLogIn" Width="Auto" Click="btnLogIn_Click" KeyboardNavigation.TabIndex="2" IsDefault="True" TabIndex="5">
                        登录
                    </Button>
                    <TextBlock Name="Administration"></TextBlock>
                    <CheckBox FontSize="14" Content="属于评审组" Name="IsBelongs2V9"
                              Visibility="Hidden"></CheckBox>
                    <TextBlock FontSize="14" MinWidth="200" Width="Auto" Name="MemberV9" Background="#FF00AF00"
                               Visibility="Hidden"></TextBlock>
                    <TextBlock Name="txtLogIn" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" Background="White" FontSize="14" KeyboardNavigation.TabIndex="1" />
                </WrapPanel>
            </StackPanel>
        </Expander>
        <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
            <WrapPanel Name="ZoneOrder">
                <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="客户号:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" 
                                                                 Text="{Binding Path=VKKKUNDNR, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="80" />
                </Grid>
                <TextBlock Width="Auto">订单号:</TextBlock>
                <TextBox   Name="txtVKPAUFKRS" MaxLength="2" Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink"  CharacterCasing="Upper" TabIndex="11" />
                <TextBox   Name="txtVKPAUFLFD" MaxLength="6" Width="80" Margin="0,0,0,0"  HorizontalAlignment="Left" KeyUp="txtVKPAUFLFD_KeyUp" />
                <TextBox   Name="txtVKPAUFPOS" MaxLength="6" Width="40" Margin="0,0,0,0"  HorizontalAlignment="Left" />
                <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnQuery" Click="btnQuery_Click" KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                    <Button.Background>
                        <ImageBrush ImageSource="Images/Search.png" />
                    </Button.Background>
                </Button>
                <WrapPanel >
                    <Button   Content="购销合同" Margin="20,0,0,0"  Width="Auto" Click="btnPrintVKPOS_Click" TabIndex="15" />
                    <Button   Content="中方采购" Margin="20,0,0,0"  Width="Auto" Click="btnPrintVKDEK_Click" TabIndex="15" />
                    <Button   Content="香港采购" Margin="20,0,0,0"  Width="Auto" Click="btnPrintVKEX_Click" TabIndex="15" />
                    <Button   Content="越南采购" Margin="20,0,0,0"  Width="Auto" Click="btnPrintVKEXVT_Click" TabIndex="15" />
                    <Button   Content="打样明细" Margin="20,0,0,0"  Width="Auto" Click="btnPrintLabDip_Click" TabIndex="15" />
                </WrapPanel>
            </WrapPanel>
            <WrapPanel> 
                <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="发货条件:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKLIEFBED, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="40" />
                </Grid>
                <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="结算方式:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBlock Grid.Column="1"  Name="txtPayment" Width="80" />
                </Grid>
                <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="运输方式:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKVERSART, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="40" />
                </Grid>
         
                <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Button Click="btnPaymentApp_Click" Content="付款" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />                    
                    <TextBlock Grid.Column="1" Grid.Row="0" Height="22" HorizontalAlignment="Left" Margin="2,0,0,0" 
                             Text="{Binding Path=VKKKOMENGE, Source={StaticResource ResourceKey=vwVKKOPF}, Converter={StaticResource ResourceKey=d100}}" 
                             VerticalAlignment="Center" Width="80" />
                </Grid>
            </WrapPanel>
            <WrapPanel>
                <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="销售合同:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBlock Grid.Column="1" Grid.Row="0" Height="22" HorizontalAlignment="Left" Margin="2,4,0,8" Text="{Binding Path=VKKBESTNR, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="80" />
                </Grid>
                <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="合同金额:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                    <TextBlock Grid.Column="1" Grid.Row="0" Height="22" HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding Path=VKKGESWERT, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="60" />
                </Grid>
            </WrapPanel>
            <WrapPanel>
                <DataGrid 
                    FontSize="12"
                    AutoGenerateColumns="False"
                    EnableRowVirtualization="True"  
                    ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                    HeadersVisibility="Column"
                    x:Name="dlgMaster"    
                    Height="150"                    
                    ScrollViewer.HorizontalScrollBarVisibility="Auto"
                    ScrollViewer.VerticalScrollBarVisibility="Auto" 
                    >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=VKPPOSTYP}" Header="类型"   Width="Auto"  MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPZUSATZ, Converter={StaticResource ResourceKey=gb2312}}" Header="标准"  Width="Auto" MinWidth="20"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="品种"   Width="Auto"  MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPFARBE, Converter={StaticResource ResourceKey=gb2312}}" Header="颜色"   Width="Auto"  MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPKDARTNR, Converter={StaticResource ResourceKey=gb2312}}" Header="客人品种"   Width="Auto"  MinWidth="100"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPKDFARBNR, Converter={StaticResource ResourceKey=gb2312}}" Header="客人色号" Width="Auto" MinWidth="100"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPMEEH}" Header="单位"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPMENGE1, Converter={StaticResource ResourceKey=d100}}" Header="数量" Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPZUGET, Converter={StaticResource ResourceKey=d100}}" Header="留位" Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPFREIGE, Converter={StaticResource ResourceKey=d100}}" Header="已出货" Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPKDBEZ, Converter={StaticResource ResourceKey=gb2312}}" Header="强力要求"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPZUDOPA}" Header="短溢装"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPZUSATZ, Converter={StaticResource ResourceKey=gb2312}}" Header="颜色标准"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPWUTERM}" Header="请求交期"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPLIEFTERM}" Header="确认交期"  Width="Auto" MinWidth="40"/>
                    </DataGrid.Columns>
                </DataGrid>
            </WrapPanel>
        </StackPanel>
        <TabControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"> 
            <TabItem Header="合同评审">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="29*"/>
                        <ColumnDefinition Width="798*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0" Grid.ColumnSpan="2">
                        <WrapPanel > 
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                
                                <TextBlock Grid.Column="1" Grid.Row="0"   HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding Path=VKPKOAUFKRS, Source={StaticResource ResourceKey=vwMaster}}" VerticalAlignment="Center" Width="40" />
                                <TextBlock Grid.Column="2" Grid.Row="0"   HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding Path=VKPKOAUFLFD, Source={StaticResource ResourceKey=vwMaster}}" VerticalAlignment="Center" Width="60" />
                                <TextBlock Grid.Column="3" Grid.Row="0"  HorizontalAlignment="Left" Margin="0,0,0,0" Text="{Binding Path=VKPKOAUFPOS, Source={StaticResource ResourceKey=vwMaster}}" VerticalAlignment="Center" Width="40" />
                                <Button Content="评审单:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" Click="btnLoadApp_Click"/>
                            </Grid> 
                            <Button  Name="btnStartApp"  Content="送审" Margin="20,0,0,0"  Width="Auto" Click="btnStartApp_Click" TabIndex="15" />
                        </WrapPanel>
                    </StackPanel>
                    <DockPanel Grid.Row="1" Grid.ColumnSpan="2">
                        <Expander Header="待处理" DockPanel.Dock="Left" MaxWidth="400">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition Height="1*"></RowDefinition>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="1*"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <StackPanel Grid.Row="0">
                                    <WrapPanel>
                                        <TextBlock Text="{Binding Path=WHAT, Converter={StaticResource ResourceKey=gb2312},Source={StaticResource ResourceKey=vwEvents}}"></TextBlock>
                                    </WrapPanel>
                                    <WrapPanel>
                                        <Button Width="30" Height="30" Click="btnWFRefresh_Click">
                                            <Button.Background>
                                                <ImageBrush ImageSource="Images/Reload.png"></ImageBrush>
                                            </Button.Background>
                                        </Button>
                                        <TextBlock Text="刷新" VerticalAlignment="Center"></TextBlock>
                                    </WrapPanel>
                                </StackPanel>
                                <DataGrid  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
                                           AutoGenerateColumns="False"
                                           EnableRowVirtualization="True"  
                                           ItemsSource="{Binding Source={StaticResource ResourceKey=vwEvents}}"  
                                           HeadersVisibility="Column"                           
                                           ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                           FontSize="12"
                                           ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,0,0,0" 
                                           >
                                    <DataGrid.Columns>
                                        <DataGridTextColumn Binding="{Binding Path=CONTROL}" Header="{Binding Source={Localization:Translate Word=状态}}"   Width="Auto"  MinWidth="30"/>
                                        <DataGridTextColumn Binding="{Binding Path=WFEUSER,Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=用户}}"  Width="Auto" MinWidth="40"/>
                                        <DataGridTextColumn Binding="{Binding Path=WFEVENTS}" Header="{Binding Source={Localization:Translate Word=事件}}"   Width="Auto"  MinWidth="40"/>
                                        <DataGridTextColumn Binding="{Binding Path=KRS}"   Width="Auto"  MinWidth="40"/>
                                        <DataGridTextColumn Binding="{Binding Path=LFD}" Header="{Binding Source={Localization:Translate Word=订单}}"   Width="Auto"  MinWidth="40"/>
                                        <DataGridTextColumn Binding="{Binding Path=ARTICLE}" Header="{Binding Source={Localization:Translate Word=品种}}"   Width="Auto"  MinWidth="40"/>
                                        <DataGridTextColumn Binding="{Binding Path=COLOR}" Header="{Binding Source={Localization:Translate Word=色号}}"   Width="Auto"  MinWidth="40"/>
                                    </DataGrid.Columns>
                                </DataGrid>
                            </Grid>
                        </Expander>
                        <Expander Header="评审情况" DockPanel.Dock="Bottom" IsExpanded="True">
                            <Grid ShowGridLines="True">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="30"></RowDefinition>
                                    <RowDefinition Height="30"></RowDefinition>
                                    <RowDefinition Height="30"></RowDefinition>
                                    <RowDefinition Height="30"></RowDefinition>
                                    <RowDefinition Height="30"></RowDefinition>
                                    <RowDefinition Height="30"></RowDefinition>
                                    <RowDefinition Height="30"></RowDefinition>
                                    <RowDefinition Height="30"></RowDefinition>
                                    <RowDefinition Height="30"></RowDefinition>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="100"></ColumnDefinition>
                                    <ColumnDefinition Width="80"></ColumnDefinition>
                                    <ColumnDefinition Width="80"></ColumnDefinition>
                                    <ColumnDefinition Width="1*"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <WrapPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4"> 
                                    <TextBlock Text="评审人为空，则相关人员未进行审核"></TextBlock>
                                    <!--Button FontSize="18" Content="{Binding Source={Localization:TranslateExtension Word=拒绝}}"  BorderBrush="Yellow" Margin="20,0,0,0"  Click="btnWFReject_Click" Width="Auto"/>
                                    <Button FontSize="18" Content="{Binding Source={Localization:TranslateExtension Word=通知}}"  BorderBrush="Yellow" Margin="20,0,0,0"  Click="WFAPPLY_Click" Width="Auto"/>
                                    <TextBlock Text="{Binding Source={Localization:Translate Word=事件}}"></TextBlock>
                                    <TextBox Name="txtEvents"  Background="White"   HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" Width="100" />
                                    <ComboBox   
                                        ItemsSource="{Binding Source={StaticResource ResourceKey=vwEvents}}"
                                        SelectionChanged="EVENTS_SelectionChanged"
                                        Background="Gray"  MinWidth="150"  
                                        DisplayMemberPath="WFEDES"
                                        IsEditable="True"
                                        SelectedValuePath="WFEVENTS"
                                        >
                                    </ComboBox-->
                                </WrapPanel>
                                <TextBlock Grid.Row="1" Grid.Column="0" Text="部门" HorizontalAlignment="Center" FontSize="18"></TextBlock>
                                <TextBlock Grid.Row="1" Grid.Column="1" Text="评审人" HorizontalAlignment="Center"  FontSize="18"></TextBlock>
                                <TextBlock Grid.Row="1" Grid.Column="2" Text="日期" HorizontalAlignment="Center"  FontSize="18"></TextBlock>
                                <TextBlock Grid.Row="1" Grid.Column="3" Text="意见" HorizontalAlignment="Center"  FontSize="18"></TextBlock>
                                <WrapPanel Grid.Row="2" Grid.Column="0" HorizontalAlignment="Stretch">
                                    <TextBlock Text="品质" VerticalAlignment="Center"></TextBlock>
                                    <CheckBox Name="IsQuality" FontSize="12" Click="IsQuality_Click" Margin="10,0,0,0" HorizontalAlignment="Right">
                                        <CheckBox.LayoutTransform>
                                            <ScaleTransform ScaleX="2" ScaleY="2" />
                                        </CheckBox.LayoutTransform>
                                    </CheckBox>
                                    <Button FontSize="18"    BorderBrush="Yellow" Margin="0,0,0,0"  
                                            Width="30" Height="30"
                                            Name="btnQuality"
                                            Click="btnWFConfirm_Click" 
                                            >
                                        <Button.Background>
                                            <ImageBrush ImageSource="Images/button_ok.png"></ImageBrush>
                                        </Button.Background>
                                    </Button>
                                </WrapPanel>
                                <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding TXT010HR,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <TextBlock Grid.Row="2" Grid.Column="2" Text="{Binding TXT010DT,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <WrapPanel Grid.Row="2" Grid.Column="3" HorizontalAlignment="Stretch" >
                                    <TextBox VerticalAlignment="Center"  HorizontalAlignment="Stretch"  MinWidth="300" Width="Auto"
                                               Text="{Binding TXT010,Source={StaticResource ResourceKey=vwPTXT}}"></TextBox>
                                </WrapPanel>
                                <WrapPanel Grid.Row="3" Grid.Column="0" >
                                    <TextBlock Text="颜色" VerticalAlignment="Center"></TextBlock>
                                    <CheckBox Name="IsColor"  FontSize="12" Click="IsQuality_Click" Margin="10,0,0,0">
                                        <CheckBox.LayoutTransform>
                                            <ScaleTransform ScaleX="2" ScaleY="2" />
                                        </CheckBox.LayoutTransform>
                                    </CheckBox>
                                    <Button FontSize="18"    BorderBrush="Yellow" Margin="0,0,0,0"  
                                            Width="30" Height="30"
                                            Name="btnColor"
                                            Click="btnWFConfirm_Click" 
                                            >
                                        <Button.Background>
                                            <ImageBrush ImageSource="Images/button_ok.png"></ImageBrush>
                                        </Button.Background>
                                    </Button>
                                </WrapPanel>
                                <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding TXT020HR,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <TextBlock Grid.Row="3" Grid.Column="2" Text="{Binding TXT020DT,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <WrapPanel Grid.Row="3" Grid.Column="3" HorizontalAlignment="Stretch" >
                                    <TextBox VerticalAlignment="Center"  MinWidth="300" Width="Auto" Text="{Binding TXT020,Source={StaticResource ResourceKey=vwPTXT}}" HorizontalAlignment="Stretch"></TextBox>
                                </WrapPanel>
                                <WrapPanel Grid.Row="4" Grid.Column="0" >
                                    <TextBlock Grid.Row="4" Grid.Column="0" Text="备料" VerticalAlignment="Center"></TextBlock>
                                    <CheckBox Name="IsMaterial"  FontSize="12" Click="IsQuality_Click" Margin="10,0,0,0">
                                        <CheckBox.LayoutTransform>
                                            <ScaleTransform ScaleX="2" ScaleY="2" />
                                        </CheckBox.LayoutTransform>
                                    </CheckBox>
                                    <Button FontSize="18"    BorderBrush="Yellow" Margin="0,0,0,0"  
                                            Width="30" Height="30"
                                            Name="btnMaterial"
                                            Click="btnWFConfirm_Click" 
                                            >
                                        <Button.Background>
                                            <ImageBrush ImageSource="Images/button_ok.png"></ImageBrush>
                                        </Button.Background>
                                    </Button>
                                </WrapPanel>
                                <TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding TXT030HR,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <TextBlock Grid.Row="4" Grid.Column="2" Text="{Binding TXT030DT,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <WrapPanel Grid.Row="4" Grid.Column="3" HorizontalAlignment="Stretch" >
                                    <TextBox VerticalAlignment="Center"  MinWidth="300" Width="Auto" Text="{Binding TXT030,Source={StaticResource ResourceKey=vwPTXT}}" HorizontalAlignment="Stretch"></TextBox>
                                </WrapPanel>
                                <WrapPanel Grid.Row="5" Grid.Column="0" >
                                    <TextBlock Text="运输"></TextBlock>
                                    <Button FontSize="18"    BorderBrush="Yellow" Margin="40,0,0,0"  
                                            Width="30" Height="30"
                                            Name="btnVV"
                                            Click="btnWFConfirm_Click" 
                                            >
                                        <Button.Background>
                                            <ImageBrush ImageSource="Images/button_ok.png"></ImageBrush>
                                        </Button.Background>
                                    </Button>
                                </WrapPanel>
                                
                                <TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding TXT040HR,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <TextBlock Grid.Row="5" Grid.Column="2" Text="{Binding TXT040DT,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <WrapPanel Grid.Row="5" Grid.Column="3" HorizontalAlignment="Stretch" >
                                    <TextBox VerticalAlignment="Center"  MinWidth="300" Width="Auto" Text="{Binding TXT040,Source={StaticResource ResourceKey=vwPTXT}}" ></TextBox>
                                    <TextBox VerticalAlignment="Center" Text="{Binding VKPLIEFTERM,Source={StaticResource ResourceKey=vwMaster}}" Width="80"></TextBox>
                                </WrapPanel>
                                <WrapPanel Grid.Row="6" Grid.Column="0" >
                                <TextBlock Text="计划"></TextBlock>
                                <Button FontSize="18"    BorderBrush="Yellow" Margin="40,0,0,0"  
                                            Width="30" Height="30"
                                            Name="btnPlan"
                                            Click="btnWFConfirm_Click" 
                                            >
                                    <Button.Background>
                                        <ImageBrush ImageSource="Images/button_ok.png"></ImageBrush>
                                    </Button.Background>
                                </Button>
                                </WrapPanel>
                                <TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding TXT050HR,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <TextBlock Grid.Row="6" Grid.Column="2" Text="{Binding TXT050DT,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <WrapPanel Grid.Row="6" Grid.Column="3" HorizontalAlignment="Stretch">
                                    <TextBox VerticalAlignment="Center"  Width="300" Text="{Binding TXT050,Source={StaticResource ResourceKey=vwPTXT}}" HorizontalAlignment="Stretch"></TextBox>
                                </WrapPanel>
                                <WrapPanel Grid.Row="7" Grid.Column="0" >
                                    <TextBlock Grid.Row="7" Grid.Column="0" Text="生产" VerticalAlignment="Center"></TextBlock>
                                    <CheckBox Name="IsProd"   FontSize="12" Click="IsQuality_Click" Margin="10,0,0,0">
                                        <CheckBox.LayoutTransform>
                                            <ScaleTransform ScaleX="2" ScaleY="2" />
                                        </CheckBox.LayoutTransform>
                                    </CheckBox>
                                    <Button FontSize="18"    BorderBrush="Yellow" Margin="00,0,0,0"  
                                            Width="30" Height="30"
                                            Name="btnProdd"
                                            Click="btnWFConfirm_Click" 
                                            >
                                        <Button.Background>
                                            <ImageBrush ImageSource="Images/button_ok.png"></ImageBrush>
                                        </Button.Background>
                                    </Button> 
                                </WrapPanel>
                                <TextBlock Grid.Row="7" Grid.Column="1" Text="{Binding TXT060HR,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <TextBlock Grid.Row="7" Grid.Column="2" Text="{Binding TXT060DT,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <WrapPanel Grid.Row="7" Grid.Column="3" HorizontalAlignment="Stretch" >
                                    <TextBox VerticalAlignment="Center"  MinWidth="300" Width="Auto" Text="{Binding TXT060,Source={StaticResource ResourceKey=vwPTXT}}" HorizontalAlignment="Stretch"></TextBox>
                                </WrapPanel>
                                <WrapPanel Grid.Row="8" Grid.Column="0">
                                    <TextBlock  Text="销售"></TextBlock>
                                    <Button FontSize="18"    BorderBrush="Yellow" Margin="40,0,0,0"  
                                            Width="30" Height="30"
                                            Name="btnSales"
                                            Click="btnWFConfirm_Click" 
                                            >
                                        <Button.Background>
                                            <ImageBrush ImageSource="Images/button_ok.png"></ImageBrush>
                                        </Button.Background>
                                    </Button>
                             
                                </WrapPanel>
                 
                                <TextBlock Grid.Row="8" Grid.Column="1" Text="{Binding TXT070HR,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <TextBlock Grid.Row="8" Grid.Column="2" Text="{Binding TXT070DT,Source={StaticResource ResourceKey=vwPTXT}}"></TextBlock>
                                <WrapPanel Grid.Row="8" Grid.Column="3" HorizontalAlignment="Stretch">
                                    <TextBox VerticalAlignment="Center" MinWidth="300" Width="Auto" Text="{Binding TXT070,Source={StaticResource ResourceKey=vwPTXT}}" HorizontalAlignment="Stretch"></TextBox>
                                </WrapPanel>
                            </Grid>
                        </Expander>
                    </DockPanel>
                </Grid>
            </TabItem>
            <TabItem Header="发货">
                <DockPanel>
                    <StackPanel DockPanel.Dock="Top">
                        <WrapPanel>
                            <TextBlock Text="查询发货"></TextBlock>
                            <Button  Height="30"  Width="30" Margin="10,0,0,0"  Click="btnQueryVV_Click" KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                                <Button.Background>
                                    <ImageBrush ImageSource="Images/Search.png" />
                                </Button.Background>
                            </Button>
                            <Button  Height="30"  Width="30" Margin="10,0,0,0"  Click="btnPrintVVVK_Click" KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                                <Button.Background>
                                    <ImageBrush ImageSource="Images/Print.png" />
                                </Button.Background>
                            </Button>
                        </WrapPanel>
                    </StackPanel>
                    <StackPanel DockPanel.Dock="Right">
                        <WrapPanel>
                        <DataGrid
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwVVLIEF}}"  
                              HeadersVisibility="Column" 
                              Height="Auto"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Path=VVLIEFSCH, Converter={StaticResource ResourceKey=pnum}}" Header="发货单"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVSTATUS}" Header="状态"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVBRUTTO, Converter={StaticResource ResourceKey=d100}}" Header="重量"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVNETTO, Converter={StaticResource ResourceKey=d100}}" Header="净重"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVNEUDAT}" Header="日期"   Width="Auto"  MinWidth="40"/>
                            </DataGrid.Columns>
                        </DataGrid>
                        <DataGrid
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwVVTLIEF}}"  
                              HeadersVisibility="Column" 
                              Height="Auto"
                            Name="dlgVVT"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Path=VVTAAUFKRS}"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVTAUFLFD, Converter={StaticResource ResourceKey=pnum}}" Header="PPO"  Width="Auto" MinWidth="20"/>
                                <DataGridTextColumn Binding="{Binding Path=VVTAUFPOS}"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVTLIEFSCH, Converter={StaticResource ResourceKey=pnum}}" Header="发货单"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVTKG, Converter={StaticResource ResourceKey=d1000}}" Header="重量"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVTNETKG, Converter={StaticResource ResourceKey=d1000}}" Header="净重"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVTPORT, Converter={StaticResource ResourceKey=gb2312}}" Header="港口" Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVTFDAT}" Header="发货日期"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=VVTFZEIT}" Header="发货时间"   Width="Auto"  MinWidth="40"/>
                            </DataGrid.Columns>
                        </DataGrid>
                        </WrapPanel>
                        <DataGrid
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwGPACK}}"  
                              HeadersVisibility="Column"
                              x:Name="dlgPACK"    
                              Height="Auto"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Path=GPAAUFKRS}"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAAUFLFD, Converter={StaticResource ResourceKey=pnum}}" Header="PPO"  Width="Auto" MinWidth="20"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAAUFPOS}"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPALIEFSCH, Converter={StaticResource ResourceKey=pnum}}" Header="发货单"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAPACKNR, Converter={StaticResource ResourceKey=pnum}}" Header="包装号"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPALBEHI, Converter={StaticResource ResourceKey=pnum}}" Header="箱号" Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAKG, Converter={StaticResource ResourceKey=d100}}" Header="重量"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAKGNET, Converter={StaticResource ResourceKey=d100}}" Header="净重"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPASPPART, Converter={StaticResource ResourceKey=trim}}" Header="批号"  Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAFBPART, Converter={StaticResource ResourceKey=trim}}" Header="纺批"  Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAART, Converter={StaticResource ResourceKey=trim}}" Header="纱支"  Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAVAR, Converter={StaticResource ResourceKey=trim}}" Header="版本"  Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAFARBE, Converter={StaticResource ResourceKey=trim}}" Header="色号"  Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAAUFMSL}" Header="内包装"  Width="Auto" MinWidth="20"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAPSTART}" Header="内包装"  Width="Auto" MinWidth="20"/>
                                <DataGridTextColumn Binding="{Binding Path=GPAPRODDAT}" Header="完成日期"  Width="Auto" MinWidth="40"/>

                            </DataGrid.Columns>
                        </DataGrid>
                    </StackPanel>
                    <DataGrid 
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwZUTEI}}"  
                              HeadersVisibility="Column"
                              x:Name="dlgZUTEI"    
                              Height="Auto"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Path=ZUAUFKRS}"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=ZUAUFLFD, Converter={StaticResource ResourceKey=pnum}}" Header="PPO"  Width="Auto" MinWidth="20"/>
                                <DataGridTextColumn Binding="{Binding Path=ZUAUFPOS}"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=ZULBEHI, Converter={StaticResource ResourceKey=pnum}}" Header="箱"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=ZUEINTKG, Converter={StaticResource ResourceKey=d100}}" Header="重量"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=ZUSPPART, Converter={StaticResource ResourceKey=gb2312}}" Header="批号" Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=ZUART, Converter={StaticResource ResourceKey=trim}}" Header="纱支"  Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=ZUVAR, Converter={StaticResource ResourceKey=trim}}" Header="版本"  Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=ZUFARBE, Converter={StaticResource ResourceKey=trim}}" Header="色号"  Width="Auto" MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=ZULO}" Header="库"  Width="Auto" MinWidth="20"/>
                                <DataGridTextColumn Binding="{Binding Path=ZULB}" Header="区"  Width="Auto" MinWidth="20"/>
                                <DataGridTextColumn Binding="{Binding Path=ZUNEUDAT}" Header="入库日期"  Width="Auto" MinWidth="40"/> 
                            </DataGrid.Columns>
                        </DataGrid>
                </DockPanel>                
            </TabItem>
        </TabControl>
    </Grid>
</local:DocumentBase>